import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    redirect: '/index/'
  },
  {
    path: '/login/',
    name: '登录页',
    component: () => import('@/view/login.vue')
  },
  {
    path: '/register/',
    name: '注册页',
    component: () => import('@/view/register.vue')
  },
  {
    path: '/index/',
    name: '主页',
    component: () => import('@/view/index.vue')
  },
  {
    path: '/change_password/',
    name: '修改密码',
    component: () => import('@/view/change_password.vue')
  },
  {
    path: '/forgot_password/',
    name: '忘记密码',
    component: () => import('@/view/forgot_password.vue')
  },
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router